package com.engine4cloud.tdf.supervision.controller.inner;

import com.engine4cloud.tdf.common.core.util.R;
import com.engine4cloud.tdf.common.data.web.response.PageInfo;
import com.engine4cloud.tdf.common.security.annotation.Inner;
import com.engine4cloud.tdf.supervision.dto.query.JzdxSimpleQueryDTO;
import com.engine4cloud.tdf.supervision.dto.result.JzdxSimpleResultDTO;
import com.engine4cloud.tdf.supervision.service.JzdxService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;


/**
 * 矫正对象-基本信息-inner
 *
 * @author wenjie
 * @date 2024-03-14 11:20:26
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/inner/corrector")
@Tag(description = "Corrector", name = "矫正对象-基本信息-inner")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class JzdxCorrectorInnerController {

    private final JzdxService jzdxService;

    /**
     * 分页查询
     *
     * @param dto 矫正对象基本信息采集表
     * @return R<PageInfo < JzdxCorrectorResultDTO>>
     */
    @Inner
    @Operation(summary = "分页查询", description = "分页查询")
    @PostMapping("/page")
    public R<PageInfo<JzdxSimpleResultDTO>> simplePageList(@Valid @RequestBody JzdxSimpleQueryDTO dto) {
        return R.ok(jzdxService.simplePageList(dto));
    }
}